﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace BOSS.Framework
{
    /// <summary>
    /// 逻辑异常
    /// </summary>
    [Serializable]
    public class LogicalException : ApplicationException
    {
        /// <summary>
        /// 获取 / 设置 详细信息
        /// </summary>
        public string Details { get; set; }

        /// <summary>
        /// 获取 / 设置 帮助信息
        /// </summary>
        public string HelpInfo { get; set; }

        /// <summary>
        /// 构造函数
        /// </summary>
        public LogicalException()
            : base("应用系统逻辑异常。")
        {
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="innerException"></param>
        public LogicalException(Exception innerException)
            : base(innerException.Message, innerException)
        {
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="message"></param>
        public LogicalException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="message"></param>
        /// <param name="innerException"></param>
        public LogicalException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected LogicalException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}
